<?php
/**
 * 首页积分赠品类别block文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	largess
 */
if (is_object($objWebInit)) {
	if(!isset($objlargess)){
		include_once(__WEB_ROOT."/largess/class/largess.class.php");
		include_once(__WEB_ROOT."/largess/config/var.inc.php");
		$objlargess = new largess();
		$objlargess->setDBG($arrGPdoDB);
		if(is_object($objWebInit->db)) $objlargess->db = $objWebInit->db;
		else $objlargess->db();
	}
	$arrParentType = array();
	$arrParentType = $objlargess->getTypeList("where type_parentid = 0",' order by initial,type_sort desc');
	//$arrParentType = $objWebInit->formatTypeList(0,$arrParentType,false);
	foreach ($arrParentType as $k=>$v){
		if(empty($arrMlargessTypeNum[$k])) $strLimit = ' limit 0,14';
		else  $strLimit = ' limit 0,'.$arrMlargessTypeNum[$k];
		$arrParentType[$k]['childtype'] = $objlargess->getTypeList("where type_parentid = '".$v['type_id']."'",' order by initial',$strLimit);
	}

	// 输出到模板
	$arrMOutput["smarty_assign"]['arrParentType'] = $arrParentType;

}
?>